.class public Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;
.super Landroid/widget/FrameLayout;
.source "CircleProgressView.java"


# instance fields
.field private a:I

.field private b:I

.field private c:I

.field private d:I

.field private e:I

.field private f:I

.field private g:I

.field private h:I

.field private i:F

.field private j:F

.field private k:Landroid/widget/TextView;

.field private l:Landroid/graphics/Paint;

.field private m:Landroid/graphics/Paint;

.field private n:Landroid/graphics/RectF;

.field private o:I


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1

    const/4 v0, 0x0

    .line 1
    invoke-direct {p0, p1, v0}, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 1

    const/4 v0, 0x0

    .line 2
    invoke-direct {p0, p1, p2, v0}, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 1

    .line 3
    invoke-direct {p0, p1, p2, p3}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    const/4 p3, 0x0

    .line 4
    iput p3, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->b:I

    .line 5
    iput p3, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->c:I

    .line 6
    iput p3, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->d:I

    const/16 v0, -0x5a

    .line 7
    iput v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->o:I

    .line 8
    sget-object v0, Les/b5;->CircleProgressView:[I

    invoke-virtual {p1, p2, v0}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[I)Landroid/content/res/TypedArray;

    move-result-object p2

    .line 9
    sget v0, Les/b5;->CircleProgressView_text_color:I

    invoke-virtual {p2, v0, p3}, Landroid/content/res/TypedArray;->getColor(II)I

    move-result v0

    iput v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->e:I

    .line 10
    sget v0, Les/b5;->CircleProgressView_circle_color:I

    invoke-virtual {p2, v0, p3}, Landroid/content/res/TypedArray;->getColor(II)I

    move-result v0

    iput v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->f:I

    .line 11
    sget v0, Les/b5;->CircleProgressView_arc_color:I

    invoke-virtual {p2, v0, p3}, Landroid/content/res/TypedArray;->getColor(II)I

    move-result v0

    iput v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->g:I

    .line 12
    sget v0, Les/b5;->CircleProgressView_circle_radius:I

    invoke-virtual {p2, v0, p3}, Landroid/content/res/TypedArray;->getDimensionPixelOffset(II)I

    move-result v0

    iput v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->h:I

    .line 13
    sget v0, Les/b5;->CircleProgressView_arc_stroke_width:I

    invoke-virtual {p2, v0, p3}, Landroid/content/res/TypedArray;->getDimensionPixelOffset(II)I

    move-result v0

    int-to-float v0, v0

    iput v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->i:F

    .line 14
    sget v0, Les/b5;->CircleProgressView_circle_stroke_width:I

    invoke-virtual {p2, v0, p3}, Landroid/content/res/TypedArray;->getDimensionPixelOffset(II)I

    move-result v0

    int-to-float v0, v0

    iput v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->j:F

    .line 15
    sget v0, Les/b5;->CircleProgressView_center_text_size:I

    invoke-virtual {p2, v0, p3}, Landroid/content/res/TypedArray;->getDimensionPixelOffset(II)I

    move-result v0

    iput v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->a:I

    .line 16
    new-instance v0, Landroid/widget/TextView;

    invoke-direct {v0, p1}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->k:Landroid/widget/TextView;

    .line 17
    iget p1, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->a:I

    int-to-float p1, p1

    invoke-virtual {v0, p3, p1}, Landroid/widget/TextView;->setTextSize(IF)V

    .line 18
    iget-object p1, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->k:Landroid/widget/TextView;

    iget p3, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->e:I

    invoke-virtual {p1, p3}, Landroid/widget/TextView;->setTextColor(I)V

    .line 19
    new-instance p1, Landroid/widget/FrameLayout$LayoutParams;

    const/4 p3, -0x2

    invoke-direct {p1, p3, p3}, Landroid/widget/FrameLayout$LayoutParams;-><init>(II)V

    const/16 p3, 0x11

    .line 20
    iput p3, p1, Landroid/widget/FrameLayout$LayoutParams;->gravity:I

    .line 21
    iget-object p3, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->k:Landroid/widget/TextView;

    invoke-virtual {p0, p3, p1}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 22
    invoke-virtual {p2}, Landroid/content/res/TypedArray;->recycle()V

    .line 23
    invoke-virtual {p0}, Landroid/widget/FrameLayout;->invalidate()V

    return-void
.end method

.method private a()V
    .locals 1

    .line 2
    invoke-virtual {p0}, Landroid/widget/FrameLayout;->getWidth()I

    move-result v0

    iput v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->c:I

    .line 3
    invoke-virtual {p0}, Landroid/widget/FrameLayout;->getHeight()I

    move-result v0

    iput v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->d:I

    return-void
.end method

.method private a(Landroid/graphics/Canvas;)V
    .locals 7

    .line 4
    invoke-direct {p0}, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->c()V

    .line 5
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->n:Landroid/graphics/RectF;

    if-nez v0, :cond_0

    .line 6
    new-instance v0, Landroid/graphics/RectF;

    invoke-direct {v0}, Landroid/graphics/RectF;-><init>()V

    iput-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->n:Landroid/graphics/RectF;

    .line 7
    :cond_0
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->n:Landroid/graphics/RectF;

    iget v1, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->c:I

    div-int/lit8 v2, v1, 0x2

    iget v3, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->h:I

    sub-int/2addr v2, v3

    int-to-float v2, v2

    iput v2, v0, Landroid/graphics/RectF;->left:F

    .line 8
    div-int/lit8 v1, v1, 0x2

    add-int/2addr v1, v3

    int-to-float v1, v1

    iput v1, v0, Landroid/graphics/RectF;->right:F

    .line 9
    iget v1, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->d:I

    div-int/lit8 v2, v1, 0x2

    sub-int/2addr v2, v3

    int-to-float v2, v2

    iput v2, v0, Landroid/graphics/RectF;->top:F

    .line 10
    div-int/lit8 v1, v1, 0x2

    add-int/2addr v1, v3

    int-to-float v1, v1

    iput v1, v0, Landroid/graphics/RectF;->bottom:F

    .line 11
    iget v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->b:I

    neg-int v0, v0

    mul-int/lit16 v0, v0, 0x168

    div-int/lit8 v0, v0, 0x64

    if-nez v0, :cond_1

    const/4 v0, -0x1

    .line 12
    :cond_1
    iget-object v2, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->n:Landroid/graphics/RectF;

    iget v1, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->o:I

    int-to-float v3, v1

    int-to-float v4, v0

    const/4 v5, 0x0

    iget-object v6, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->m:Landroid/graphics/Paint;

    move-object v1, p1

    invoke-virtual/range {v1 .. v6}, Landroid/graphics/Canvas;->drawArc(Landroid/graphics/RectF;FFZLandroid/graphics/Paint;)V

    return-void
.end method

.method private b()V
    .locals 6

    .line 1
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->k:Landroid/widget/TextView;

    invoke-virtual {p0}, Landroid/widget/FrameLayout;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    sget v2, Les/z4;->durec_common_progress:I

    const/4 v3, 0x1

    new-array v3, v3, [Ljava/lang/Object;

    iget v4, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->b:I

    invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    const/4 v5, 0x0

    aput-object v4, v3, v5

    invoke-virtual {v1, v2, v3}, Landroid/content/res/Resources;->getString(I[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    return-void
.end method

.method private b(Landroid/graphics/Canvas;)V
    .locals 4

    .line 2
    invoke-direct {p0}, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->d()V

    .line 3
    iget v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->c:I

    div-int/lit8 v0, v0, 0x2

    int-to-float v0, v0

    iget v1, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->d:I

    div-int/lit8 v1, v1, 0x2

    int-to-float v1, v1

    iget v2, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->h:I

    int-to-float v2, v2

    iget-object v3, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->l:Landroid/graphics/Paint;

    invoke-virtual {p1, v0, v1, v2, v3}, Landroid/graphics/Canvas;->drawCircle(FFFLandroid/graphics/Paint;)V

    return-void
.end method

.method private c()V
    .locals 2

    .line 1
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->m:Landroid/graphics/Paint;

    if-eqz v0, :cond_0

    return-void

    .line 2
    :cond_0
    new-instance v0, Landroid/graphics/Paint;

    invoke-direct {v0}, Landroid/graphics/Paint;-><init>()V

    iput-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->m:Landroid/graphics/Paint;

    const/4 v1, 0x1

    .line 3
    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    .line 4
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->m:Landroid/graphics/Paint;

    iget v1, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->g:I

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V

    .line 5
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->m:Landroid/graphics/Paint;

    sget-object v1, Landroid/graphics/Paint$Style;->STROKE:Landroid/graphics/Paint$Style;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    .line 6
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->m:Landroid/graphics/Paint;

    iget v1, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->i:F

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStrokeWidth(F)V

    .line 7
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->m:Landroid/graphics/Paint;

    sget-object v1, Landroid/graphics/Paint$Cap;->ROUND:Landroid/graphics/Paint$Cap;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStrokeCap(Landroid/graphics/Paint$Cap;)V

    return-void
.end method

.method private d()V
    .locals 2

    .line 1
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->l:Landroid/graphics/Paint;

    if-eqz v0, :cond_0

    return-void

    .line 2
    :cond_0
    new-instance v0, Landroid/graphics/Paint;

    invoke-direct {v0}, Landroid/graphics/Paint;-><init>()V

    iput-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->l:Landroid/graphics/Paint;

    const/4 v1, 0x1

    .line 3
    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    .line 4
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->l:Landroid/graphics/Paint;

    iget v1, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->f:I

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V

    .line 5
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->l:Landroid/graphics/Paint;

    sget-object v1, Landroid/graphics/Paint$Style;->STROKE:Landroid/graphics/Paint$Style;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    .line 6
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->l:Landroid/graphics/Paint;

    iget v1, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->j:F

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStrokeWidth(F)V

    return-void
.end method


# virtual methods
.method public a(I)V
    .locals 0

    .line 1
    iput p1, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->b:I

    return-void
.end method

.method protected onDraw(Landroid/graphics/Canvas;)V
    .locals 0

    .line 1
    invoke-direct {p0}, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->a()V

    .line 2
    invoke-direct {p0}, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->b()V

    .line 3
    invoke-direct {p0, p1}, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->b(Landroid/graphics/Canvas;)V

    .line 4
    invoke-direct {p0, p1}, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->a(Landroid/graphics/Canvas;)V

    .line 5
    invoke-virtual {p0}, Landroid/widget/FrameLayout;->invalidate()V

    .line 6
    iget p1, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->o:I

    add-int/lit8 p1, p1, -0x1

    iput p1, p0, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->o:I

    return-void
.end method

.method protected onSizeChanged(IIII)V
    .locals 0

    .line 1
    invoke-super {p0, p1, p2, p3, p4}, Landroid/widget/FrameLayout;->onSizeChanged(IIII)V

    .line 2
    invoke-direct {p0}, Lcom/esfile/screen/recorder/videos/edit/ui/CircleProgressView;->a()V

    return-void
.end method
